package com.xiangban.yanglaodajie_platform.entity.res;
public enum ApiResultCode {
    // 操作成功标识
    SUCCESS(200, "Success"),
    // 系统异常标识
    SYS_ERROR(500, "当前网络不稳定，请稍后重试"),

    //----------------------------------------
    // 通用异常
    // 区间：10001-10050
    //----------------------------------------
    COMMON_PARAM_NULL(10001, "必要参数[%s]为空"),
    COMMON_PARAM_INVALID(10002, "%s无效"),
    CONTAINS_ILLEGAL_CHARACTERS(10003, "%s含有非法字符"),
    DATA_NOT_EXIST(10004, "%s不存在"),
    NO_PERMISSION_OPERATE(10005, "没有%s的操作权限"),
    CAN_NOT_BE_OPERATE(10006, "%s不能%s"),
    FIELD_NOT_ALLOWED_EMPTY(10010, "%s不能为空"),
    FIELD_VALUE_MUST_LARGE_THAN(10011, "%s必须大于%s"),
    FIELD_VALUE_MUST_LESS_THAN(10012, "%s必须小于%s"),
    DATA_EXIST(10013, "%s已存在"),
    FIELD_NOT_EMAIL(10013, "%s格式错误"),
    FIELD_NOT_MOBILE(10014, "%s格式错误"),
    FIELD_NOT_ID_NUM(10015, "%s格式错误"),
    FIELD_NOT_DATE(10016, "%s格式错误"),
    FIELD_LENGTH_MUST_LESS(10017, "%s必须小于%d"),
    FIELD_LENGTH_MUST_MORE(10018, "%s必须大于%d"),
    FIELD_LENGTH_MUST_BETWEEN(10019, "%s长度必须大于%d和小于%d"),
    FILED_NOT_IN_ENUM_VALUES(10020, "不支持的%s"),
    FIELD_NOT_BOTH_BE_EMPTY(10021, "%s不能同时为空"),
    MUST_BE_INTEGER_MULTIPLE(10022, "%s必须是%s的整数倍"),
    UPLOAD_PICTURES_ERROR(10023, "上传图片出错，%s"),

    FIELD_VALUE_MUST_GE_THAN(10023, "%s必须大于等于%s"),
    FIELD_VALUE_MUST_LE_THAN(10024, "%s必须小于等于%s"),
    FIELD_VALUE_MUST_DONE(10025, "%s还未%s"),

    TIME_MUST_LARGE_THAN(10030, "%s必须晚于%s"),
    TIME_VALUE_MUST_LESS_THAN(10031, "%s必须早于%s"),
    INVALID_CHANGE_STATUS(10032, "%s更新状态非法"),
    FIELD_DIGITAL(10033, "获取商品信息出错"),
    LENGTH_MUST_LESS(10034, "%s必须小于%s"),
    LENGTH_MUST_MORE(10035, "%s必须大于%s"),
    NO_DATA_FOUND(10036, "暂无数据"),
    COMMON_MESSAGE(10045, "%s"),
    IS_DEFAULT_ADDRESS(10046, "%s已设为默认值"),


    //----------------------------------------
    // api调用异常
    // 区间：10051-10099
    //----------------------------------------
    FLAG_NO_VOUCHER(10051, "未携带有效凭证"),
    FLAG_FAIL_VOUCHER(10052, "凭证认证失败"),
    FLAG_NO_ACCESS_ID(10053, "ACCESS_ID不能为空"),
    FLAG_NO_ACCESS_SECRET(10054, "ACCESS_SECRET不能为空"),


    //----------------------------------------
    //
    // 区间：20001-20050
    //----------------------------------------
    NOT_PERMISSION(20000,"暂无权限"),
    NOT_TOKEN(20001,"未登录"),
    FAILED_TOKEN(20002,"身份认证失败"),
    FAILED_LOGIN(20003,"账号或密码不正确"),
    PHONE_NULL(20004,"手机号不能为空"),
    FAILED_VERIFICATION(20005,"验证码过期或者不正确"),
    FAILED_ACCOUNT(20006,"账号不存在"),
    NULL_ACCOUNT(20007,"账号不能为空"),
    NULL_LOGIN_TYPE(20008,"登陆类型不能为空"),
    NOT_USER_ROLE_LEGAL(20009,"用户权限不合法"),
    EXIST_ACCOUNT(20010,"账号已经存在"),
    EXIST_PHONE(20011,"手机号已经存在"),
    PARAMETER_DEFICIENCY(20012,"缺少必填参数"),
    PARAMETER_EXCEPTION(20013,"参数填写错误"),
    VERIFICATION_CODE(20014,"验证码获取失败"),
    ORDERS_EXIST(20015,"已报名"),
    CLASS_NOT_EXIST(20016,"没有报名此课程"),
    SIGN_NOT_TIME(20017,"不在签到时间内"),
    CLASS_NOT_TODAY(20018,"今天没有课程"),
    LOCATION_NOT_SCOPE(20019,"不在打卡地点范围"),
    PRICE_DEFICIENCY(20020,"积分不足"),
    NOT_LONGTIME(20021,"没有签到时长,请去报名活动"),
    NOT_ALLOW_SIGN(20022,"您有未签退的课程，请结束后在签到"),
    ACTIVITY_PAST(20023,"活动已过报名日期"),
    ORDERS_ERROR(20024,"此订单不符合退款标准"),
    ORDERS_NULL(20025,"此订单不存在"),
    ORDERS_FALSE(20026,"此订单不归属该商家"),
    ORDERS_EXCEPTION(20027,"异常订单"),
    ORDERS_TRUE(20028,"此订单已被核销"),
    AGE_ERROR(20029,"年龄不符合购买条件"),
    NUMBER_NULL(20030,"不能再少了"),
    ORDER_NULL(20031,""),
    ACTIVITY_FULL(20032,"报名人数已满"),
    SIGN_TIME_NOT(20033,"当前时间不可签退"),
    GOODS_EXIT(20034,"存在不符合退款条件商品"),
    EXIST_ORDERS(20035,"课程不可重复报名")
    ;
    public Integer code;
    public String message;

    public String getCodeS() {
        return codeS;
    }

    public String codeS;

    ApiResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    ApiResultCode(String codeS, String message) {
        this.codeS = codeS;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
